<!-- Copyright (c) 2019-2020 十三 all rights reserved. -->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="mall/header::head-fragment('NewBee商城-秒杀商品列表','seckill-list')">
</head>
<body>
<header th:replace="mall/header::header-fragment"></header>
<!-- nav -->
<nav th:replace="mall/header::nav-fragment"></nav>

<div class="seckill-title">
    <img class="seckill-img" src="https://newbee-mall.oss-cn-beijing.aliyuncs.com/miaosha-bg.png">
</div>

<div class="goods_item center">
    <div class="main center" id="seckill-list">
        <th:block th:unless="${#lists.isEmpty(seckillList)}">
            <th:block th:each="seckillItem : ${seckillList}">
                <div class="item_card_frame" th:onclick="'gotoSeckillDetail('+${seckillItem.seckillId}+')'" >
                    <div class="item_card">
                        <img th:src="@{${seckillItem.goodsCoverImg}}" th:alt="${seckillItem.goodsName}" />
                    </div>
                    <div class="item_brand" th:text="${seckillItem.goodsName}"></div>
                    <div class="item_sub_intro" th:text="'秒杀时段：'+${seckillItem.seckillBegin}+' → '+${seckillItem.seckillEnd}"></div>
                    <div class="seckill_price">
                        <th:block th:text="${seckillItem.seckillPrice}+'.00 元'"></th:block>
                        <del>
                            <th:block th:text="${seckillItem.sellingPrice}+'.00 元'"></th:block>
                        </del>
                        <button class="btn-danger">立即抢购</button>
                    </div>
                </div>
            </th:block>
        </th:block>
        <!-- 未配置则显示默认 -->
        <th:block th:if="${#lists.isEmpty(seckillList)}">
            <img style="margin-top: 16px;padding: 16px 20px;" src="./mall/image/null-content.png">
        </th:block>
    </div>
    <div class="pages">
        <div class="page_wrap">
        </div>
    </div>
</div>

<div th:replace="mall/footer::footer-fragment"></div>
<!-- jQuery -->
<script th:src="@{/mall/plugins/jquery/jquery.min.js}"></script>
<script th:src="@{/mall/js/search.js}" type="text/javascript"></script>
<script th:inline="javascript"> var _ctx = [[@{/}]]; </script>
<script>
    function gotoSeckillDetail(seckillId) {
        window.location.href = _ctx + 'seckill/' + seckillId;
    }
</script>
</body>
</html>
